package com.yx.enterresourceplanning.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.yx.enterresourceplanning.service.serviceImpl.HandleJsonServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Json")
public class HandleJsonMapper {
    @PostMapping("/HandleJsonMapper")
    public Object HandleJson(@RequestParam(name="jsonInput") String jsonInput) throws JsonProcessingException {
        //调用HandleJsonServiceImpl类中的HandleJsonMapper方法
        return HandleJsonServiceImpl.HandleJsonMapper(jsonInput);
    }
}
